<?xml version="1.0" encoding="utf-8" ?>
<log4net>

	<root>
		<!--如果只需要看看Sql设置INFO就够了，如果你要调试可以设置为DEBUG或ALL-->
		<priority value="INFO" />
		<appender-ref ref="RollingFile_nhi" />
	</root>


	<logger name="ApplicationInfoLog">
		<level value="DEBUG" />
		<appender-ref ref="RollingFile_sys" />
	</logger>


	<appender name="RollingFile_nhi" type="log4net.Appender.RollingFileAppender,log4net" >

		<param name="File" value="D:\51API\log\" />
		<param name="AppendToFile" value="true" />
		<param name="RollingStyle" value="Date" />
		<param name="DatePattern" value="yyyyMMdd&quot;_nhi.log&quot;" />
		<param name="StaticLogFileName" value="false" />

		<layout type="log4net.Layout.PatternLayout,log4net">
			<param name="ConversionPattern" value="%d [%t] %-5p %c [%x] &lt;%X{auth}&gt; - %m%n" />
		</layout>
	</appender>

	<appender name="RollingFile_sys" type="log4net.Appender.RollingFileAppender,log4net" >

		<param name="File" value="D:\51API\log\" />
		<param name="AppendToFile" value="true" />
		<param name="RollingStyle" value="Date" />
		<param name="DatePattern" value="yyyyMMdd&quot;_sys.log&quot;" />
		<param name="StaticLogFileName" value="false" />

		<layout type="log4net.Layout.PatternLayout,log4net">
			<param name="ConversionPattern" value="%d [%t] %-5p %c [%x] &lt;%X{auth}&gt; - %m%n" />
		</layout>
	</appender>

</log4net>